<?php
    include 'dbconfig.php'; 
    mysql_select_db($db, $con);
    
    $id = $_POST['id'];
    $name = $_POST['name'];
    $area1 = $_POST['area1'];
    $area2 = $_POST['area2'];
    $comp = $_POST['comp'];
    $credits = $_POST['credits'];
    
    $query2 = "UPDATE course_templates SET name='$name', comp='$comp', area1='$area1', area2='$area2', ects=$credits, reviewed = 1 WHERE id = $id LIMIT 1";
    
    echo $query2;
    
    mysql_query($query2);
    
    mysql_close($con);

?>